<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>123</p>
        <p>{{name}}</p>
        <p v-text="name"> </p>
        <p>{{age}}</p>
        <p>
            {{doubleAge}}
        </p>
        <input type="text" text v-model="name">
        <p><button @click="changeName">哈哈</button></p>
        <div v-html="html"></div>
    </div>
    <script src="compile.js"></script>
    <script src="Mvue.js"></script>
    <script>
        let app = new Mvue({
            el: '#app',
            data: {
                name: 'i am test',
                age: 12,
                html: '<button @click="buttonhandle">这是一个按钮</button>'
            },
            created() {
                console.log('开始啦')
                setTimeout(() => {
                    this.name = '我是蜗牛'
                }, 1500);
            },
            methods: {
                changeName() {
                    this.name = 'jsthin'
                    this.age = 27
                    this.id = 'xx'
                    console.log(1,this)
                },
                buttonhandle() {
                    console.log('我被点击了')
                } 
            }
        })
    </script>
</body>
</html>